/*
 * qiangungun.com Inc.
 * Copyright (c) 2014 All Rights Reserved.
 */package com.qiangungun.report.dal.ibatis;import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;import com.qiangungun.report.dal.daointerface.RptcfgQueryParamDAO;// auto generated importsimport java.util.List;import org.springframework.dao.DataAccessException;import com.qiangungun.report.dal.dataobject.RptcfgQueryParamDO;/** * An ibatis based implementation of dao interface <tt>com.qiangungun.report.dal.daointerface.RptcfgQueryParamDAO</tt>. * * This file is generated by <tt>financenet-dalgen</tt>, a DAL (Data Access Layer)
 * code generation utility specially developed for <tt>iwallet</tt> project.
 * 
 * PLEASE DO NOT MODIFY THIS FILE MANUALLY, or else your modification may
 * be OVERWRITTEN by someone else. To modify the file, you should go to 
 * directory <tt>(project-home)/biz/dal/src/conf/dalgen</tt>, and 
 * find the corresponding configuration file (<tt>tables/rptcfg_query_param.xml</tt>). 
 * Modify the configuration file according to your needs, then run <tt>financenet-dalgen</tt> 
 * to generate this file.
 *
 */@SuppressWarnings({"unchecked","deprecation"})public class IbatisRptcfgQueryParamDAO extends SqlMapClientDaoSupport implements RptcfgQueryParamDAO {	/**
	 *  Query DB table <tt>rptcfg_query_param</tt> for records.
	 *
	 *  <p>
	 *  The sql statement for this operation is <br>
	 *  <tt>select ID, DEFINE_ID, PARAM_EN_NAME, PARAM_CN_NAME, DISPLAY_SEQUENCE, MODULE_TYPE, IS_EDITABLE, IS_NULLABLE, DEFAULT_VALUE, INTERFACE_URL, INTERFACE_PARA, COL_WIDTH, DATA_TYPE, CHECKED_VALUE, UNCHECKED_VALUE from rptcfg_query_param</tt>
	 *
	 *	@return List<RptcfgQueryParamDO>
	 *	@throws DataAccessException
	 */	 
    public List<RptcfgQueryParamDO> loadAll() throws DataAccessException {

        return getSqlMapClientTemplate().queryForList("MS-RPTCFG-QUERY-PARAM-LOAD-ALL", null);

    }		/**
	 *  Query DB table <tt>rptcfg_query_param</tt> for records.
	 *
	 *  <p>
	 *  The sql statement for this operation is <br>
	 *  <tt>select ID, DEFINE_ID, PARAM_EN_NAME, PARAM_CN_NAME, DISPLAY_SEQUENCE, MODULE_TYPE, IS_EDITABLE, IS_NULLABLE, DEFAULT_VALUE, INTERFACE_URL, INTERFACE_PARA, COL_WIDTH, DATA_TYPE, CHECKED_VALUE, UNCHECKED_VALUE from rptcfg_query_param where (PARAM_EN_NAME = ?)</tt>
	 *
	 *	@param paramEnName
	 *	@return RptcfgQueryParamDO
	 *	@throws DataAccessException
	 */	 
    public RptcfgQueryParamDO queryByName(String paramEnName) throws DataAccessException {

        return (RptcfgQueryParamDO) getSqlMapClientTemplate().queryForObject("MS-RPTCFG-QUERY-PARAM-QUERY-BY-NAME", paramEnName);

    }		/**
	 *  Query DB table <tt>rptcfg_query_param</tt> for records.
	 *
	 *  <p>
	 *  The sql statement for this operation is <br>
	 *  <tt>select ID, DEFINE_ID, PARAM_EN_NAME, PARAM_CN_NAME, DISPLAY_SEQUENCE, MODULE_TYPE, IS_EDITABLE, IS_NULLABLE, DEFAULT_VALUE, INTERFACE_URL, INTERFACE_PARA, COL_WIDTH, DATA_TYPE, CHECKED_VALUE, UNCHECKED_VALUE from rptcfg_query_param where (DEFINE_ID = ?)</tt>
	 *
	 *	@param defineId
	 *	@return RptcfgQueryParamDO
	 *	@throws DataAccessException
	 */	 
    public RptcfgQueryParamDO queryByDefineId(Long defineId) throws DataAccessException {

        return (RptcfgQueryParamDO) getSqlMapClientTemplate().queryForObject("MS-RPTCFG-QUERY-PARAM-QUERY-BY-DEFINE-ID", defineId);

    }		/**
	 *  Insert one <tt>RptcfgQueryParamDO</tt> object to DB table <tt>rptcfg_query_param</tt>, return primary key
	 *
	 *  <p>
	 *  The sql statement for this operation is <br>
	 *  <tt>insert into rptcfg_query_param(ID,DEFINE_ID,PARAM_EN_NAME,PARAM_CN_NAME,DISPLAY_SEQUENCE,MODULE_TYPE,IS_EDITABLE,IS_NULLABLE,DEFAULT_VALUE,INTERFACE_URL,INTERFACE_PARA,COL_WIDTH,DATA_TYPE,CHECKED_VALUE,UNCHECKED_VALUE) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)</tt>
	 *
	 *	@param rptcfgQueryParam
	 *	@return Long
	 *	@throws DataAccessException
	 */	 
    public Long insert(RptcfgQueryParamDO rptcfgQueryParam) throws DataAccessException {
    	if (rptcfgQueryParam == null) {
    		throw new IllegalArgumentException("Can't insert a null data object into db.");
    	}
    	
        getSqlMapClientTemplate().insert("MS-RPTCFG-QUERY-PARAM-INSERT", rptcfgQueryParam);

        return rptcfgQueryParam.getId();
    }		/**
	 *  Delete records from DB table <tt>rptcfg_query_param</tt>.
	 *
	 *  <p>
	 *  The sql statement for this operation is <br>
	 *  <tt>delete from rptcfg_query_param where (ID = ?)</tt>
	 *
	 *	@param rptcfgQueryParam
	 *	@return int
	 *	@throws DataAccessException
	 */	 
    public int delete(RptcfgQueryParamDO rptcfgQueryParam) throws DataAccessException {
    	if (rptcfgQueryParam == null) {
    		throw new IllegalArgumentException("Can't delete by a null data object.");
    	}


        return getSqlMapClientTemplate().delete("MS-RPTCFG-QUERY-PARAM-DELETE", rptcfgQueryParam);
    }	/**
	 *  Update DB table <tt>rptcfg_query_param</tt>.
	 *
	 *  <p>
	 *  The sql statement for this operation is <br>
	 *  <tt>update rptcfg_query_param set DEFINE_ID=?, PARAM_EN_NAME=?, PARAM_CN_NAME=?, DISPLAY_SEQUENCE=?, MODULE_TYPE=?, IS_EDITABLE=?, IS_NULLABLE=?, DEFAULT_VALUE=?, INTERFACE_URL=?, INTERFACE_PARA=?, COL_WIDTH=?, DATA_TYPE=?, CHECKED_VALUE=?, UNCHECKED_VALUE=? where (ID = ?)</tt>
	 *
	 *	@param rptcfgQueryParam
	 *	@return int
	 *	@throws DataAccessException
	 */	 
    public int update(RptcfgQueryParamDO rptcfgQueryParam) throws DataAccessException {
    	if (rptcfgQueryParam == null) {
    		throw new IllegalArgumentException("Can't update by a null data object.");
    	}


        return getSqlMapClientTemplate().update("MS-RPTCFG-QUERY-PARAM-UPDATE", rptcfgQueryParam);
    }	}	